package com.sc.userspringboot.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户帖子收藏关联表
 * </p>
 *
 * @author user
 * @since 2025-09-19 06:25:46
 */
@Getter
@Setter
@TableName("post_collections")
public class PostCollections {

    /**
     * 收藏记录唯一ID
     */
    @TableId(value = "collection_id", type = IdType.AUTO)
    private Integer collectionId;

    /**
     * 收藏用户ID
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 关联帖子ID（帖子删除时，收藏同步删除）
     */
    @TableField("post_id")
    private Integer postId;

    /**
     * 收藏时间
     */
    @TableField("collect_time")
    private Date collectTime;

    @TableField(exist = false)
    private Users user;
}
